<?php
/**
 * 	Bushido
 *
 * @category   Bushido
 * @package    Bushido_Chart
 * @copyright  Copyright (c) 2008-2009 Nathan Keyes
 * @author Nathan Keyes
 * @version    $Id: Chart.php 7 2009-11-14 22:42:08Z nkeyes $
 */

/**
 * 
 * @author Nathan Keyes
 *
 */
class Bushido_Chart
{
	
	/**
	 * 
	 * @return void
	 */
	public function __construct(){}
	
	
	/**
	 * 
	 * @return void
	 */
	public function __clone(){}
	
	
	/**
	 * 
	 * @param $chart
	 * @param $visitor
	 * @return string
	 */
	public static function chartFactory(Bushido_Datagram_Abstract $chart, $visitor)
	{
		switch($visitor)
		{
			case 'FusionCharts':
				return Bushido_FusionCharts::getChart($chart);
				break;
			case 'JQuerySparkline':
				return Bushido_JQuerySparkline::getChart($chart);
				break;
			default:
				return NULL;
		}
		
	}
	
	/**
	 * 
	 * @param $chart
	 * @param $visitor
	 * @return string
	 */
	public static function chartXMLFactory(Bushido_Datagram_Abstract $chart, $visitor)
	{
		switch($visitor)
		{
			case 'FusionCharts':
				return Bushido_FusionCharts::getChartXML($chart);
				break;
			case 'JQuerySparkline':
				return Bushido_JQuerySparkline::getChartXML($chart);
				break;
			default:
				return NULL;
		}
	}
}
